<template>
    <div class="fullScreen bg-c-wh">
        <m-header :msg="'历史走势'"></m-header>
        <div class="marg-05 tx-c tx-s-12 lineh-2">
            <div class="flex-box bg-c-g bor-r">
                <div class="wd-25 bor-l bor-t">期数</div>
                <div class="wd-25 bor-l bor-t">开奖</div>
                <div class="wd-25 bor-l bor-t">总和点数</div>
                <div class="wd-25 bor-l bor-t">总和大小</div>
            </div>
            <div class="scroll-tre tx-c-666">
                <div class="bor-r bor-b">
                    <div class="flex-box" v-for="item in list" :key="item.issue">
                        <div class="wd-25 bor-l bor-t">{{ item.issue }}</div>
                        <div class="wd-25 bor-l bor-t">{{ item.number }}</div>
                        <div class="wd-25 bor-l bor-t">{{ item.zh }}</div>
                        <div class="wd-25 bor-l bor-t">{{ item.zhDX }}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script type="text/ecmascript-6">
import 'common/css/lottery.css'
import MHeader from '../../../components/m-header'
import { trendAll } from '../../../common/js/axiosUtil'
export default {
    data () {
        return {
            list : []
        }
    },
    created () {
        this.getData()
    },
    methods : {
        // 获取历史走势数据
        getData () {
            this.$toast('加载中...', 1000000) 
            let params = this.$params(0)
            params.append('type', this.$store.state.lotType) 
            trendAll(params)
            .then((response)=> { 
                this.$toastClose()
                if(response.data.code == "200"){ 
                    this.list = response.data.data
                } else {
                    this.$logAgain(response.data.msg)
                } 
            })
            .catch((error)=> {
                this.$toast('请求服务失败', 2000)
            })
        }
    },
    components: {
        MHeader
    }
}
</script>